package com.workcell.workdata.xthings.entity.mqtt;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.workcell.workdata.xthings.constant.ExtOutputAttributes;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 阀门表
 * @TableName t_valve_data
 */
@TableName(value ="t_valve_data")
@Data
@Accessors(chain = true)
public class ValveData implements Serializable {
    /**
     * 主键
     */
    private String id;

    /**
     * 主设备编码
     */
    private String masterDeviceNo;

    /**
     * 从设备编码
     */
    private String slaveDeviceNo;

    /**
     * 机器码
     */
    private String addressId;

    /**
     * 厂商编码
     */
    private String manufacturerCode;

	/**
     * 阀门状态（0：开, 1：关）
	 */
	@ExtOutputAttributes(key = "阀门状态")
	private String deviceStatus;

	/**
	 * 阀门开度
	 */
	@ExtOutputAttributes(key = "阀门开度")
	private String currentOpening;
	/**
	 * 手动设定值
	 */
	@ExtOutputAttributes(key = "手动设定值")
	private String manualSetpoint;
	/**
	 * 开到位
	 */
	@ExtOutputAttributes(key = "开到位")
	private String openPlace;
	/**
	 * 关到位
	 */
	@ExtOutputAttributes(key = "关到位")
	private String closePlace;
	/**
	 * 异常状态
	 */
	@ExtOutputAttributes(key = "异常状态")
	private String unusualStatus;
	/**
	 * 运算异常状态
	 */
	@ExtOutputAttributes(key = "运算异常状态")
	private String operateUnusualStatus;

    /**
     * 数据入库时间
     */
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
